package com.sptpc.drink.dao;

import com.sptpc.drink.pojo.Category;
import com.sptpc.drink.pojo.Drink;

import java.util.List;

public interface DrinkMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Drink record);

    int insertSelective(Drink record);

    Drink selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Drink record);

    int updateByPrimaryKey(Drink record);

    List<Drink> selectAll();
//查询drink的信息，包含drink所属于的category信息
    List<Drink> selectDrinkAndCategory();

//查询某个category下面所有的drink信息
    List<Drink> selectDrinkByCategory(Category category);

//根据名字拆线呢drink信息，模糊拆线呢，可能会查询出多个drink，所以返回类型用list
    List<Drink> selectDrinkByName(String name);
}